package com.powernode.springboot.controller;

import com.powernode.springboot.bean.Vip;
import com.powernode.springboot.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class VipController {
    @Autowired
    private VipService vipService;

    @GetMapping("vipDetail")
    public Vip findVipDetail(@RequestParam("cardNum") String cardNum) {
        return vipService.findByCardNum(cardNum);
    }
}
